//
//  UserInfo.h
//  FZAH
//
//  Created by Yoga on 2017/3/27.
//  Copyright © 2017年 zdqk. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "UserModel.h"
#import "UserInterfaceModel.h"
#import "UserCounterFeeModel.h"
#import "AppDelegate.h"
#import "MYAFNetworking.h"

@interface UserInfo : NSObject

+ (instancetype)shareInstance;

@property (nonatomic, strong) UserModel *user; // 存所有的token、ID等
//@property (nonatomic, strong) UserInterfaceModel *userInterface; // 存所有的基本信息
@property (nonatomic, strong) UserCounterFeeModel *userCounterFee; // 手续费百分比
@property (nonatomic, assign) BOOL isLogin; // 是否是登录状态
@property (nonatomic, assign) BOOL isOpen;  // 是否开启大众金融

@property (nonatomic, copy) NSString *deviceToken;

@property (nonatomic, copy) NSString *latitude;
@property (nonatomic, copy) NSString *longitude;

//@property (nonatomic, strong) NSMutableArray *addressArray;

- (void)getUserModel;

- (void)updateUserModel;
- (void)logout;

- (void)updateUserInterfaceModel:(void (^)(BOOL success))block;
- (void)updateUserCounterFeeModel:(void (^)(BOOL success))block;
- (void)updateDefaultAddress:(void (^)(BOOL success))block;

- (void)saveLatitudeLongitudeTimeStap;
- (NSTimeInterval)getLatitudeLogitudeTimeStap;
@property (nonatomic, assign) BOOL isSendPosition;

// 启动页
- (BOOL)isFirstLaunchApp;
- (void)didLoadGuideView;

- (void)connectRongCloud;
@end
